<?

include_once "gblinclude.lib";
include_once "rellayout.lib";

$relListLayout = new CRelListLayout();
$activeTabName = $relListLayout->objInfo->objInfos[$_GET["parent_name"]]->activeTabName;
$pubFile = $relListLayout->objInfo->objInfos[$_GET["parent_name"]]->pubFilePath;
include_once "..".$pubFile;

$relToolBox = GetToolBox();
$boxItem = new CSideBoxItem("", "", "");
$relToolBox->siteBoxItems[] = $boxItem;
$backUrl = $relListLayout->objInfo->objInfos[$_GET["parent_name"]]->viewUrl.'?ID='.RegisterID($relListLayout->parentObjId);
$boxItem = new CSideBoxItem("/img/back.gif", "Back To View", $backUrl);
$relToolBox->siteBoxItems[] = $boxItem;
		
$layoutFactory = new CLayoutFactory();
$layoutFactory->setActiveTab($activeTabName);
$layoutFactory->addSideBox($relToolBox);
$content = $relListLayout->layout();

$header = $layoutFactory->getHeader();
$tail = $layoutFactory->getTail();
$body = $layoutFactory->getBody($content);

echo $header.$body.$tail;

?>
